--- import MainHead from '../../components/MainHead.astro'; import Nav from '../../components/Nav.astro'; import PostPreview from '../../components/PostPreview.astro'; import Pagination from '../../components/Pagination.astro'; import authorData from '../../data/authors.json'; export async function getStaticPaths({ paginate, rss }) { const allPosts = Astro.fetchContent('../post/*.md'); const sortedPosts = allPosts.sort((a, b) => new Date(b.date).valueOf() - new Date(a.date).valueOf()); // Generate an RSS feed from this collection of posts. // NOTE: This is disabled by default, since it requires `buildOptions.site` to be set in your "astro.config.mjs" file. // rss({ // title: 'Don’s Blog', // description: 'An example blog on Astro', // customData: `en-us`, // items: sortedPosts.map(item => ({ // title: item.title, // description: item.description, // link: item.url, // pubDate: item.date, // })), // }); // Return a paginated collection of paths for all posts return paginate(sortedPosts, { pageSize: 1 }); } // page let title = 'Don’s Blog'; let description = 'An example blog on Astro'; let canonicalURL = Astro.request.canonicalURL; // collection interface MarkdownFrontmatter { date: number; description: string; title: string; } const { page } = Astro.props; --- {title}